package class_work.chapter_1_4;

import java.util.Scanner;

/**
 * @author haomin
 * @date 2022/03/30 13:52
 **/
public class Cylinder {
    public static void main(String[] args) {
        System.out.println("圆柱体的半径和长度:");
        Scanner scanner = new Scanner(System.in);
        double r = scanner.nextDouble();
        double l = scanner.nextDouble();

        double area = r * r * Math.PI;
        double volume = area * l;

        System.out.println("圆柱体的面积为："+ area);
        System.out.println("圆柱体的体积为："+ volume);
    }
}